package com.rightsidetech.activity.mapper;

import com.rightsidetech.activity.dto.request.ActCouponActivityPageReq;
import com.rightsidetech.activity.dto.response.ActCouponActivityInfoResp;
import com.rightsidetech.activity.dto.response.ActCouponActivityPageResp;
import com.rightsidetech.activity.dto.response.ActFindCouponResp;
import com.rightsidetech.activity.dto.response.ActStoreCouponResp;
import com.rightsidetech.activity.entity.ActCouponActivity;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ActCouponActivityMapper {
    int deleteByPrimaryKey(Long id);

    int insert(ActCouponActivity record);

    int insertSelective(ActCouponActivity record);

    ActCouponActivity selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(ActCouponActivity record);

    int updateByPrimaryKeySelective2(ActCouponActivity record);

    int updateByPrimaryKey(ActCouponActivity record);

    List<ActCouponActivityPageResp> activityPage(ActCouponActivityPageReq req);

    ActCouponActivity selectByName(String name);

    ActCouponActivityInfoResp activityInfo(Long activityId);

    int updateStatus(@Param("id") Long id, @Param("status") Byte status);

    int updateStatusEnd(Long id);

    List<ActFindCouponResp> findCoupon(Long level);

    List<ActCouponActivity> selectByStatusAndEndTime();

    int countByCouponBaseId(@Param("couponBaseId") Long couponBaseId);

    //查询进行中的优惠活动
    List<ActCouponActivity> selectUsedActivity();

    //查询进行中的优惠活动
    List<ActCouponActivity> selectStoreUsedActivity();

    List<ActCouponActivity> selectUsedActivityByActivityIds(List<Long> list);

    ActCouponActivity findByActivityNo(@Param("activityNo") String activityNo);

    List<ActStoreCouponResp> selectStoredUsedActivity();

    List<Long> findStatisActivityId();
}